﻿using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using TabbedTemplate.Services;
using TabbedTemplate.Util;

namespace TabbedTemplate.ViewModels
{
    public class HelperPageViewModel : ViewModelBase
    {
        private IStoreService _storeService;
        private readonly GenerateInitialDbFile _generateInitialDbFile;

        public HelperPageViewModel(IStoreService storeService)
        {
            _generateInitialDbFile = new GenerateInitialDbFile(storeService);
        }

        private RelayCommand _beijingCacheInitialCommand;

        public RelayCommand BeijingCacheInitialCommand =>
            _beijingCacheInitialCommand ??= new RelayCommand(BeijingCacheInitialCommandFunction);

        public void BeijingCacheInitialCommandFunction() =>
            _generateInitialDbFile.GenerateBeijingDbCache();

    }
}
